From b9f70b473c353d920f77f272a66aa16c6de7e8d7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Timm=20B=C3=A4der?= Date: Thu, 25 May 2017 17:34:23 +0200 Subject: [PATCH] scrollbar: Add new API to gtk4-sections.txt and update the css node docs --- docs/reference/gtk/gtk4-sections.txt | 2 ++ gtk/gtkrange.c | 1 + gtk/gtkscrollbar.c | 16 +++++++--------- gtk/gtkscrollbar.h | 2 +- 4 files changed, 11 insertions(+), 10 deletions(-) diff --git a/docs/reference/gtk/gtk4-sections.txt b/docs/reference/gtk/gtk4-sections.txt index b99227b039..2f99965640 100644 --- a/docs/reference/gtk/gtk4-sections.txt +++ b/docs/reference/gtk/gtk4-sections.txt @@ -2524,6 +2524,8 @@ gtk_scrollable_get_type GtkScrollbar GtkScrollbar gtk_scrollbar_new +gtk_scrollbar_get_adjustment +gtk_scrollbar_set_adjustment GTK_SCROLLBAR GTK_IS_SCROLLBAR diff --git a/gtk/gtkrange.c b/gtk/gtkrange.c index f8afc2ccfc..efb0e97534 100644 --- a/gtk/gtkrange.c +++ b/gtk/gtkrange.c @@ -458,6 +458,7 @@ gtk_range_class_init (GtkRangeClass *class) g_object_class_install_properties (gobject_class, LAST_PROP, properties); gtk_widget_class_set_accessible_type (widget_class, GTK_TYPE_RANGE_ACCESSIBLE); + gtk_widget_class_set_css_name (widget_class, "range"); } static void diff --git a/gtk/gtkscrollbar.c b/gtk/gtkscrollbar.c index 13268f0d0a..2f6b7c8d8e 100644 --- a/gtk/gtkscrollbar.c +++ b/gtk/gtkscrollbar.c @@ -26,7 +26,7 @@ #include "config.h" #include "gtkscrollbar.h" -#include "gtkrangeprivate.h" +#include "gtkrange.h" #include "gtkadjustment.h" #include "gtkintl.h" @@ -59,17 +59,15 @@ * * |[ * scrollbar[.fine-tune] - * ╰── contents - * ├── [button.up] - * ├── [button.down] - * ├── trough - * │ ╰── slider - * ├── [button.up] - * ╰── [button.down] + * ╰── box + * ╰── range + * ╰── trough + * ╰── slider * ]| * * GtkScrollbar has a main CSS node with name scrollbar and a subnode for its - * contents, with subnodes named trough and slider. + * contents. Both the main node and the box subnode get the .horizontal or .vertical + * style classes applied, depending on the scrollbar's orientation. * * The main node gets the style class .fine-tune added when the scrollbar is * in 'fine-tuning' mode. diff --git a/gtk/gtkscrollbar.h b/gtk/gtkscrollbar.h index 1844c537e3..0f35a93724 100644 --- a/gtk/gtkscrollbar.h +++ b/gtk/gtkscrollbar.h @@ -30,7 +30,7 @@ #error "Only can be included directly." #endif -#include +#include G_BEGIN_DECLS -- 2.30.2